package com.emily.test.service.impl;

import com.emily.test.mapper.SSalaryMapper;
import com.emily.test.model.SSalary;
import com.emily.test.service.SalaryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author tqx
 * @company haihui
 * @create 2019-04-25 13:47
 */
@Service
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
public class SalaryServiceImpl implements SalaryService {

    @Resource
    private SSalaryMapper sSalaryMapper;

    @Override
    public int insertSalaryList(List<SSalary> sSalaryList) {
        return sSalaryMapper.insertSalaryList(sSalaryList);
    }

    @Override
    public List<SSalary> selectSalaryInfo(SSalary sSalary) {
        return sSalaryMapper.selectSalaryInfo(sSalary);
    }

    @Override
    public List<SSalary> selectPrimarySalaryInfo(SSalary sSalary) {
        return sSalaryMapper.selectPrimarySalaryInfo(sSalary);
    }

    @Override
    public SSalary findSalaryInfoById(Integer id) {
        return sSalaryMapper.findSalaryInfoById(id);
    }

    @Override
    public int updateSalaryInfoById(SSalary sSalary) {
        return sSalaryMapper.updateSalaryInfoById(sSalary);
    }

    @Override
    public List<SSalary> getLeiJiSalaryInfoList(Map<String, Object> selectMap) {
        return sSalaryMapper.getLeiJiSalaryInfoList(selectMap);
    }
}
